//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CrmBusinessCard, CrmBusinessCardResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCrmBusinessCardList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CrmBusinessCardResponse>(`/uctoo/crm_business_card/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCrmBusinessCard = async (id: string) => {
  return requestClient.get<CrmBusinessCard>(`/uctoo/crm_business_card/${id}`);
};

export const adductooCrmBusinessCard = async (data: Partial<CrmBusinessCard>) => {
  return requestClient.post<CrmBusinessCard>('/uctoo/crm_business_card/add', data);
};

export const edituctooCrmBusinessCard = async (data: Partial<CrmBusinessCard>) => {
  return requestClient.post<CrmBusinessCard>('/uctoo/crm_business_card/edit', data);
};

export const deleteuctooCrmBusinessCard = async (id: string) => {
  return requestClient.post<any>('/uctoo/crm_business_card/del', { id });
};
